Fault Configuration
THAPI Manager allows users to centrally configure fault handling for gateway errors across multiple gateways within an organization. These configurations encompass fault structure, content type (applicable to REST and SOAP) and fault messages, ensuring consistent error handling and customization at global, gateway, plan and resource levels. Each level offers the flexibility to override settings as needed, ensuring precise error responses tailored to API versions, plans and subscriptions.
- Navigate to the Global Configuration module's Fault Configuration sub-module.

Configure Rest Fault Configuration
Configure Default Content Type
The Content Type can be overwritten for Resources, Gateway, as well as at the plan level.
-
Select REST tab.
-
Click to expand the Default Content Type.

-
Click to choose the necessary Content Type (JSON/XML/PlainText) option to be defined at Gateway Level, Plan Level and Resource Level.
-
Click Save.
On saving, the confirmation message appears as shown below.

Configure Default Fault Structure
The Fault Structure can be overwritten for Resources, Gateway, as well as at the plan level.
-
Select REST tab.
-
Click to expand the Default Content Type.

-
Edit the JSON, XML, or Plain Text Fault box to modify the Fault template at the Gateway, Plan and Resource level as needed.
-
Click Save.
On saving, the confirmation message appears as shown below.

Update Scenario-wise Fault Message
The Fault Message can be overwritten for Resources, Gateway as well as at the plan level.
-
Select REST tab.
-
Click to expand the Scenario-wise Fault Message.

-
Edit the Response Code, HTTP Code and Fault Message Content for each Scenario at the Gateway, Plan and for Resource level as needed.
-
Click Save.
On saving, the confirmation message appears as shown below.

Configure SOAP Fault Configuration
Configure Default Fault Structure
The Fault Structure can be overwritten for Gateway, Operations, as well as at the plan level.
-
Select SOAP tab.
-
Click to expand the Default Fault Structure.

-
Edit the XML Fault as needed.
-
Click Save.
On saving, the confirmation message appears as shown below.

Configure Scenario-wise Fault Message
The Fault Message can be overwritten for Gateway, Operations, as well as at the plan level.
-
Select SOAP tab.
-
Click to expand the Scenario-wise Fault Message.

-
Edit the Response Code, HTTP Code and Fault Message Content for each Scenario at the Gateway, Plan Level and for operations level as needed.
-
Click Save.
On saving, the confirmation message appears as shown below.

Configure GraphQL Fault Configuration
Configure Default Fault Structure
The Fault Structure can be overwritten for Gateway, Resources, as well as at the plan level.
-
Select GraphQL tab.
-
Click to expand the Default Fault Structure.

-
Edit the JSON Fault at the Gateway, Plan Level and for Resource level as needed.
-
Click Save.
On saving, the confirmation message appears as shown below.

Configure Scenario-wise Fault Message
The Fault Message can be overwritten for Gateway, Resources, as well as at the plan level.
-
Select GraphQL tab.
-
Click to expand the Scenario-wise Fault Message.

-
Edit the Response Code, HTTP Code and Fault Message Content for each Scenario at the Plan level, Gateway level and for Resource level as needed.
-
Click Save.
On saving, the confirmation message appears as shown below.
